package cn.edu.neu.lab603.cloudeval.strategy.policy

import cn.edu.neu.lab603.cloudeval.monitor.HostUtilizationMonitor
import cn.edu.neu.lab603.math.getRobustLoessParameterEstimates

/** 使用 local regression robust 策略对能耗进行预测的主机选择策略。
  *
  * Created by yfwz100 on 2016/11/9.
  */
class HostSelectionPolicyLRR(utilMonitor: HostUtilizationMonitor,
                             fallback: HostSelectionPolicyUtilizationBase,
                             safety: Double = 1.0,
                             capacityFactor: Double = 1.0)
  extends HostSelectionPolicyLR(utilMonitor, fallback, capacityFactor) {

  override def getParameterEstimates(utilizationHistoryReversed: Array[Double]): Array[Double] =
    getRobustLoessParameterEstimates(utilizationHistoryReversed)

  override def toString = "LRR"
}
